/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ObjectFileOptions;


import Strategy.A_Interface;
import Interface.IChat;
import Packets.pkValue;
import StaticClass.ArrSocket;
import Thread.ThreadChat;
import java.io.*;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;

/**
 *
 * @author Oho doc va ghi 1 file
 */
public class ObjectFile implements ObjectFileOption {

    Socket sk;
    ThreadChat tc1;
    public ObjectFile(Socket k,ObjectInputStream in , ObjectOutputStream out,ThreadChat tc) {
        this.sk = k;
        this.in = in ;
        this.out = out;
        this.tc1 = tc;
    }
    /*pk: goi tin 
     * str: client/server
     * value: read/write
    */
    
    ObjectOutputStream out;
    ObjectInputStream in;

    public void progessWrite(Socket sk, pkValue pk) {
      

           
            //   Check(pk);
            A_Interface ai = new A_Interface(tc1);
            ai.setSIPart(1);
            ai.Check(pk, ArrSocket.nameServer, "WRITE",in,out);
            //  out.close();
       
    }

    public void progessRead() {
      

           //pkValue vl =null;
            A_Interface ai = new A_Interface(tc1);
            ai.setSIPart(1);
            pkValue pk =null;
           ai.Check(pk, ArrSocket.nameServer, "READ",in,out);

            //in.close();


        
    }
}
